#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
using namespace std;
class Solution {
public:
    string addBinary(string a, string b)
    {
        string ret;
        int carry = 0;
        int end1 = a.size() - 1;
        int end2 = b.size() - 1;
        while (end1 >= 0 || end2 >= 0)
        {
            int e1 = end1 >= 0 ? a[end1--] - '0' : 0;
            int e2 = end2 >= 0 ? b[end2--] - '0' : 0;
            int sum = (e1 + e2) + carry;
            ret += (sum % 2) + '0';
            carry = sum / 2;
        }
        if (carry > 0)
        {
            ret += carry + '0';
        }
        reverse(ret.begin(), ret.end());
        return ret;
    }
};
int main()
{
    Solution s1;
    string a;
    string b;
    cin >> a >> b;
    s1.addBinary(a, b);
    return 0;
}